import "../base/request.dart";

// 收藏请求接口
class FavouriteRequest extends BaseRequest {
  String uid; // 收藏视频uid
  bool _isDelete; // 判断是否是取消收藏

  FavouriteRequest(String id, {isDelete = false}) {
    uid = id;
    _isDelete = isDelete;
    this
      ..setHeader('fa', 'course-flag')
      ..setHeader('ZmEtMjAyMS0wNC0xMiAyMToyMjoyMC1mYQ==fa', 'auth-token');
  }
  @override
  bool get isHttps => true;

  @override
  SupportMethods get method =>
      _isDelete ? SupportMethods.DELETE : SupportMethods.POST;

  @override
  bool get needLogin => true;

  @override
  String get path => "favorite/$uid";

  @override
  String get route => "uapi/fa";
}
